home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Source ƒ / sky source ƒ / FMOD.C < prev    next >
Encoding:
Text File  |  1992-06-16  |  191 b   |  13 lines

  1. double
  2. fmod(x, y)
  3. double x, y;
  4. {
  5.     extern double modf();
  6.     double z, d;
  7.  
  8.     if (y == 0.0)
  9.         return (x);
  10.     z = modf(x/y, &d);    /* the use of z is a hack to get around void */
  11.     return (x - d * y);
  12. }
  13.